<?php
/**
 * 全局项加载
 * 
 * @copyright (c)2010 昆明力行软件  保留所有权利。
 * @link http://www.tis-tis.com
 * @Author: XiangJie
 * @version: 1.0.0
 */

ob_start();

require_once '../init.php';

require_once TIS_ROOT.'/tis_options.php';
include TIS_ROOT.'/config.php';
require_once TIS_ROOT.'/libs/function.base.php';
require_once TIS_ROOT.'/libs/function.login.php';
require_once TIS_ROOT.'/libs/class.cache.php';
require TIS_ROOT.'/internal/mysql.class.php';

header('Content-Type: text/html; charset=UTF-8');
$DB = MySql::getInstance();
$CACHE = mkcache::getInstance();
$options_cache = $CACHE->readCache('tis_options');
extract($options_cache);

$act = isset($_REQUEST['act']) ? addslashes($_REQUEST['act']) : 'list';

$userData = array();
define('ISLOGIN',	isLogin());
define('ROLE', ISLOGIN === true ? $userData['role'] : 'visitor');//用户组: admin管理员, writer联合撰写人, visitor访客
define('UID', ISLOGIN === true ? $userData['uid'] : '');//用户ID
define('TPLS_PATH', 	TIS_ROOT.'/content/templates/');//模板库路径
define('DYNAMIC_BLOGURL', getBlogUrl());//解决前台多域名ajax跨域